<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::PartlyPrecomputedMatrix&lt; Matrix &gt; Class Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html">PartlyPrecomputedMatrix</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_partly_precomputed_matrix-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle"><div class="title">shark::PartlyPrecomputedMatrix&lt; Matrix &gt; Class Template Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Partly Precomputed version of a matrix for quadratic programming.  
 <a href="classshark_1_1_partly_precomputed_matrix.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_partly_precomputed_matrix_8h_source.html">shark/LinAlg/PartlyPrecomputedMatrix.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a8be5faef0110766a6555b3b068a6c2dd" id="r_a8be5faef0110766a6555b3b068a6c2dd"><td class="memItemLeft" align="right" valign="top">typedef Matrix::QpFloatType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a8be5faef0110766a6555b3b068a6c2dd">QpFloatType</a></td></tr>
<tr class="separator:a8be5faef0110766a6555b3b068a6c2dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab2069225766e15ddd81809953c940467" id="r_ab2069225766e15ddd81809953c940467"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#ab2069225766e15ddd81809953c940467">PartlyPrecomputedMatrix</a> (Matrix *base, std::size_t cachesize=0x4000000)</td></tr>
<tr class="separator:ab2069225766e15ddd81809953c940467"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0fbdf12f7e6492c18ddfc302d4c9572" id="r_aa0fbdf12f7e6492c18ddfc302d4c9572"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#aa0fbdf12f7e6492c18ddfc302d4c9572">isCached</a> (std::size_t k) const</td></tr>
<tr class="separator:aa0fbdf12f7e6492c18ddfc302d4c9572"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed8139929435c448eac748cf119ef275" id="r_aed8139929435c448eac748cf119ef275"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#aed8139929435c448eac748cf119ef275">row</a> (std::size_t k, blas::vector&lt; <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a8be5faef0110766a6555b3b068a6c2dd">QpFloatType</a> &gt; &amp;storage) const</td></tr>
<tr class="separator:aed8139929435c448eac748cf119ef275"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03dac3c5b68cbbef9e750e693045e281" id="r_a03dac3c5b68cbbef9e750e693045e281"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a8be5faef0110766a6555b3b068a6c2dd">QpFloatType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a03dac3c5b68cbbef9e750e693045e281">operator()</a> (std::size_t i, std::size_t j) const</td></tr>
<tr class="separator:a03dac3c5b68cbbef9e750e693045e281"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2997ebc625fd707aefc9798af295720" id="r_ad2997ebc625fd707aefc9798af295720"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a8be5faef0110766a6555b3b068a6c2dd">QpFloatType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#ad2997ebc625fd707aefc9798af295720">entry</a> (std::size_t i, std::size_t j) const</td></tr>
<tr class="separator:ad2997ebc625fd707aefc9798af295720"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1fe8b1e8873dfc5759d9e20ff8bd5e0" id="r_af1fe8b1e8873dfc5759d9e20ff8bd5e0"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#af1fe8b1e8873dfc5759d9e20ff8bd5e0">size</a> () const</td></tr>
<tr class="separator:af1fe8b1e8873dfc5759d9e20ff8bd5e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71a5881acfb1700c75ea8af7dba9faae" id="r_a71a5881acfb1700c75ea8af7dba9faae"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a71a5881acfb1700c75ea8af7dba9faae">getMaxCacheSize</a> ()</td></tr>
<tr class="separator:a71a5881acfb1700c75ea8af7dba9faae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9eb387c2805fafb33a441aced6d58d8c" id="r_a9eb387c2805fafb33a441aced6d58d8c"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a9eb387c2805fafb33a441aced6d58d8c">getCacheRowSize</a> () const</td></tr>
<tr class="separator:a9eb387c2805fafb33a441aced6d58d8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a3f00c54a5f0091362ff9e97585e08718" id="r_a3f00c54a5f0091362ff9e97585e08718"><td class="memItemLeft" align="right" valign="top">blas::matrix&lt; <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a8be5faef0110766a6555b3b068a6c2dd">QpFloatType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a3f00c54a5f0091362ff9e97585e08718">m_cachedMatrix</a></td></tr>
<tr class="memdesc:a3f00c54a5f0091362ff9e97585e08718"><td class="mdescLeft">&#160;</td><td class="mdescRight">container for precomputed values  <br /></td></tr>
<tr class="separator:a3f00c54a5f0091362ff9e97585e08718"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c38550f063ffc8d3aaa50c4889bd85a" id="r_a0c38550f063ffc8d3aaa50c4889bd85a"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a0c38550f063ffc8d3aaa50c4889bd85a">m_cacheSize</a></td></tr>
<tr class="separator:a0c38550f063ffc8d3aaa50c4889bd85a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23fe0f2623b4208befc7c292fe95114e" id="r_a23fe0f2623b4208befc7c292fe95114e"><td class="memItemLeft" align="right" valign="top">Matrix *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a23fe0f2623b4208befc7c292fe95114e">m_baseMatrix</a></td></tr>
<tr class="separator:a23fe0f2623b4208befc7c292fe95114e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aedd47b5de6066fc436da1cad1a0a89c7" id="r_aedd47b5de6066fc436da1cad1a0a89c7"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#aedd47b5de6066fc436da1cad1a0a89c7">m_originalNumberOfRows</a></td></tr>
<tr class="separator:aedd47b5de6066fc436da1cad1a0a89c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class Matrix&gt;<br />
class shark::PartlyPrecomputedMatrix&lt; Matrix &gt;</div><p>Partly Precomputed version of a matrix for quadratic programming. </p>
<dl class="section user"><dt></dt><dd>The <a class="el" href="classshark_1_1_partly_precomputed_matrix.html" title="Partly Precomputed version of a matrix for quadratic programming.">PartlyPrecomputedMatrix</a> class computes all pairs of kernel evaluations that fits the given cachesize in its constructor and stores them im memory.</dd></dl>
<dl class="section user"><dt></dt><dd>Use of this class may be beneficial for certain model selection strategies, where the whole matrix does not fit into memory, and the LRU cache will produce too much hit rates, so that at least partially caching the kernel matrix will help. In particular this will help the KernelSGD/Pegasos algorithm. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_partly_precomputed_matrix_8h_source.html#l00068">68</a> of file <a class="el" href="_partly_precomputed_matrix_8h_source.html">PartlyPrecomputedMatrix.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a8be5faef0110766a6555b3b068a6c2dd" name="a8be5faef0110766a6555b3b068a6c2dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8be5faef0110766a6555b3b068a6c2dd">&#9670;&#160;</a></span>QpFloatType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef Matrix::QpFloatType <a class="el" href="classshark_1_1_partly_precomputed_matrix.html">shark::PartlyPrecomputedMatrix</a>&lt; Matrix &gt;::QpFloatType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_partly_precomputed_matrix_8h_source.html#l00071">71</a> of file <a class="el" href="_partly_precomputed_matrix_8h_source.html">PartlyPrecomputedMatrix.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ab2069225766e15ddd81809953c940467" name="ab2069225766e15ddd81809953c940467"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2069225766e15ddd81809953c940467">&#9670;&#160;</a></span>PartlyPrecomputedMatrix()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html">shark::PartlyPrecomputedMatrix</a>&lt; Matrix &gt;::PartlyPrecomputedMatrix </td>
          <td>(</td>
          <td class="paramtype">Matrix *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>cachesize</em> = <code>0x4000000</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructor </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">base</td><td>matrix to be cached. it is assumed that this matrix is not precomputed, but the (costy) computation takes place every time an entry is queried. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cachesize</td><td>size of the cache to use in bytes. the size of the cached matrix will </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_partly_precomputed_matrix_8h_source.html#l00078">78</a> of file <a class="el" href="_partly_precomputed_matrix_8h_source.html">PartlyPrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a23fe0f2623b4208befc7c292fe95114e">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::m_baseMatrix</a>, <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a3f00c54a5f0091362ff9e97585e08718">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::m_cachedMatrix</a>, <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a0c38550f063ffc8d3aaa50c4889bd85a">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::m_cacheSize</a>, <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#aedd47b5de6066fc436da1cad1a0a89c7">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::m_originalNumberOfRows</a>, <a class="el" href="_exception_8h.html#adce1f80097c69010f5eab2618fa2e971">SHARK_RUNTIME_CHECK</a>, and <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#af1fe8b1e8873dfc5759d9e20ff8bd5e0">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::size()</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ad2997ebc625fd707aefc9798af295720" name="ad2997ebc625fd707aefc9798af295720"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2997ebc625fd707aefc9798af295720">&#9670;&#160;</a></span>entry()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a8be5faef0110766a6555b3b068a6c2dd">QpFloatType</a> <a class="el" href="classshark_1_1_partly_precomputed_matrix.html">shark::PartlyPrecomputedMatrix</a>&lt; Matrix &gt;::entry </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>j</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>return a single matrix entry param[in] i row of entry param[in] j column entry </p><dl class="section return"><dt>Returns</dt><dd>value of matrix at given position </dd></dl>

<p class="definition">Definition at line <a class="el" href="_partly_precomputed_matrix_8h_source.html#l00168">168</a> of file <a class="el" href="_partly_precomputed_matrix_8h_source.html">PartlyPrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#aa0fbdf12f7e6492c18ddfc302d4c9572">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::isCached()</a>, <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a23fe0f2623b4208befc7c292fe95114e">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::m_baseMatrix</a>, and <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a3f00c54a5f0091362ff9e97585e08718">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::m_cachedMatrix</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a03dac3c5b68cbbef9e750e693045e281">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::operator()()</a>.</p>

</div>
</div>
<a id="a9eb387c2805fafb33a441aced6d58d8c" name="a9eb387c2805fafb33a441aced6d58d8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9eb387c2805fafb33a441aced6d58d8c">&#9670;&#160;</a></span>getCacheRowSize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_partly_precomputed_matrix.html">shark::PartlyPrecomputedMatrix</a>&lt; Matrix &gt;::getCacheRowSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>return the dimension of a row in the cache (as we do not shorten our rows, this must be the same as the dimension of a row in the original kernel matrix). </p><dl class="section return"><dt>Returns</dt><dd>dimension of any cached row </dd></dl>

<p class="definition">Definition at line <a class="el" href="_partly_precomputed_matrix_8h_source.html#l00201">201</a> of file <a class="el" href="_partly_precomputed_matrix_8h_source.html">PartlyPrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a3f00c54a5f0091362ff9e97585e08718">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::m_cachedMatrix</a>.</p>

</div>
</div>
<a id="a71a5881acfb1700c75ea8af7dba9faae" name="a71a5881acfb1700c75ea8af7dba9faae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a71a5881acfb1700c75ea8af7dba9faae">&#9670;&#160;</a></span>getMaxCacheSize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_partly_precomputed_matrix.html">shark::PartlyPrecomputedMatrix</a>&lt; Matrix &gt;::getMaxCacheSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>return size of cached matrix in QpFloatType units </p><dl class="section return"><dt>Returns</dt><dd>the capacity of the cached matrix in QpFloatType units </dd></dl>

<p class="definition">Definition at line <a class="el" href="_partly_precomputed_matrix_8h_source.html#l00191">191</a> of file <a class="el" href="_partly_precomputed_matrix_8h_source.html">PartlyPrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a3f00c54a5f0091362ff9e97585e08718">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::m_cachedMatrix</a>.</p>

</div>
</div>
<a id="aa0fbdf12f7e6492c18ddfc302d4c9572" name="aa0fbdf12f7e6492c18ddfc302d4c9572"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0fbdf12f7e6492c18ddfc302d4c9572">&#9670;&#160;</a></span>isCached()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classshark_1_1_partly_precomputed_matrix.html">shark::PartlyPrecomputedMatrix</a>&lt; Matrix &gt;::isCached </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>k</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>return, if a given row is cached </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">k</td><td>row to check </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>is given row in cached matrix or not? </dd></dl>

<p class="definition">Definition at line <a class="el" href="_partly_precomputed_matrix_8h_source.html#l00116">116</a> of file <a class="el" href="_partly_precomputed_matrix_8h_source.html">PartlyPrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a3f00c54a5f0091362ff9e97585e08718">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::m_cachedMatrix</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#ad2997ebc625fd707aefc9798af295720">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::entry()</a>, and <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#aed8139929435c448eac748cf119ef275">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::row()</a>.</p>

</div>
</div>
<a id="a03dac3c5b68cbbef9e750e693045e281" name="a03dac3c5b68cbbef9e750e693045e281"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a03dac3c5b68cbbef9e750e693045e281">&#9670;&#160;</a></span>operator()()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a8be5faef0110766a6555b3b068a6c2dd">QpFloatType</a> <a class="el" href="classshark_1_1_partly_precomputed_matrix.html">shark::PartlyPrecomputedMatrix</a>&lt; Matrix &gt;::operator() </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>j</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>return a single matrix entry param[in] i row of entry param[in] j column entry </p><dl class="section return"><dt>Returns</dt><dd>value of matrix at given position </dd></dl>

<p class="definition">Definition at line <a class="el" href="_partly_precomputed_matrix_8h_source.html#l00157">157</a> of file <a class="el" href="_partly_precomputed_matrix_8h_source.html">PartlyPrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#ad2997ebc625fd707aefc9798af295720">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::entry()</a>.</p>

</div>
</div>
<a id="aed8139929435c448eac748cf119ef275" name="aed8139929435c448eac748cf119ef275"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed8139929435c448eac748cf119ef275">&#9670;&#160;</a></span>row()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_partly_precomputed_matrix.html">shark::PartlyPrecomputedMatrix</a>&lt; Matrix &gt;::row </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">blas::vector&lt; <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a8be5faef0110766a6555b3b068a6c2dd">QpFloatType</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>storage</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>return a complete row of the matrix. if the row is cached, it will be returned from there, if not, it will be recomputed on-the-fly and not stored. param[in] k row to compute param[in] storage vector to store the row. must be the same size as a row! </p>

<p class="definition">Definition at line <a class="el" href="_partly_precomputed_matrix_8h_source.html#l00130">130</a> of file <a class="el" href="_partly_precomputed_matrix_8h_source.html">PartlyPrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#aa0fbdf12f7e6492c18ddfc302d4c9572">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::isCached()</a>, <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a3f00c54a5f0091362ff9e97585e08718">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::m_cachedMatrix</a>, <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#aedd47b5de6066fc436da1cad1a0a89c7">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::m_originalNumberOfRows</a>, <a class="el" href="_exception_8h.html#abd848215f138fc44f696aecb3e417e6c">RANGE_CHECK</a>, and <a class="el" href="_exception_8h.html#a42a6a50e4d06c00d60fbca5333f40768">SIZE_CHECK</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a31c7513f29d280ad3165d18100962391">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::train()</a>.</p>

</div>
</div>
<a id="af1fe8b1e8873dfc5759d9e20ff8bd5e0" name="af1fe8b1e8873dfc5759d9e20ff8bd5e0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1fe8b1e8873dfc5759d9e20ff8bd5e0">&#9670;&#160;</a></span>size()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_partly_precomputed_matrix.html">shark::PartlyPrecomputedMatrix</a>&lt; Matrix &gt;::size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>return the number of cached rows </p><dl class="section return"><dt>Returns</dt><dd>number of rows that are cached </dd></dl>

<p class="definition">Definition at line <a class="el" href="_partly_precomputed_matrix_8h_source.html#l00182">182</a> of file <a class="el" href="_partly_precomputed_matrix_8h_source.html">PartlyPrecomputedMatrix.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a3f00c54a5f0091362ff9e97585e08718">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::m_cachedMatrix</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#ab2069225766e15ddd81809953c940467">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::PartlyPrecomputedMatrix()</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a23fe0f2623b4208befc7c292fe95114e" name="a23fe0f2623b4208befc7c292fe95114e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23fe0f2623b4208befc7c292fe95114e">&#9670;&#160;</a></span>m_baseMatrix</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Matrix* <a class="el" href="classshark_1_1_partly_precomputed_matrix.html">shark::PartlyPrecomputedMatrix</a>&lt; Matrix &gt;::m_baseMatrix</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_partly_precomputed_matrix_8h_source.html#l00216">216</a> of file <a class="el" href="_partly_precomputed_matrix_8h_source.html">PartlyPrecomputedMatrix.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#ad2997ebc625fd707aefc9798af295720">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::entry()</a>, and <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#ab2069225766e15ddd81809953c940467">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::PartlyPrecomputedMatrix()</a>.</p>

</div>
</div>
<a id="a3f00c54a5f0091362ff9e97585e08718" name="a3f00c54a5f0091362ff9e97585e08718"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f00c54a5f0091362ff9e97585e08718">&#9670;&#160;</a></span>m_cachedMatrix</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">blas::matrix&lt;<a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a8be5faef0110766a6555b3b068a6c2dd">QpFloatType</a>&gt; <a class="el" href="classshark_1_1_partly_precomputed_matrix.html">shark::PartlyPrecomputedMatrix</a>&lt; Matrix &gt;::m_cachedMatrix</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>container for precomputed values </p>

<p class="definition">Definition at line <a class="el" href="_partly_precomputed_matrix_8h_source.html#l00210">210</a> of file <a class="el" href="_partly_precomputed_matrix_8h_source.html">PartlyPrecomputedMatrix.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#ad2997ebc625fd707aefc9798af295720">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::entry()</a>, <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a9eb387c2805fafb33a441aced6d58d8c">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::getCacheRowSize()</a>, <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#a71a5881acfb1700c75ea8af7dba9faae">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::getMaxCacheSize()</a>, <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#aa0fbdf12f7e6492c18ddfc302d4c9572">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::isCached()</a>, <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#ab2069225766e15ddd81809953c940467">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::PartlyPrecomputedMatrix()</a>, <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#aed8139929435c448eac748cf119ef275">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::row()</a>, and <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#af1fe8b1e8873dfc5759d9e20ff8bd5e0">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::size()</a>.</p>

</div>
</div>
<a id="a0c38550f063ffc8d3aaa50c4889bd85a" name="a0c38550f063ffc8d3aaa50c4889bd85a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c38550f063ffc8d3aaa50c4889bd85a">&#9670;&#160;</a></span>m_cacheSize</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classshark_1_1_partly_precomputed_matrix.html">shark::PartlyPrecomputedMatrix</a>&lt; Matrix &gt;::m_cacheSize</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_partly_precomputed_matrix_8h_source.html#l00213">213</a> of file <a class="el" href="_partly_precomputed_matrix_8h_source.html">PartlyPrecomputedMatrix.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#ab2069225766e15ddd81809953c940467">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::PartlyPrecomputedMatrix()</a>.</p>

</div>
</div>
<a id="aedd47b5de6066fc436da1cad1a0a89c7" name="aedd47b5de6066fc436da1cad1a0a89c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aedd47b5de6066fc436da1cad1a0a89c7">&#9670;&#160;</a></span>m_originalNumberOfRows</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Matrix &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classshark_1_1_partly_precomputed_matrix.html">shark::PartlyPrecomputedMatrix</a>&lt; Matrix &gt;::m_originalNumberOfRows</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_partly_precomputed_matrix_8h_source.html#l00219">219</a> of file <a class="el" href="_partly_precomputed_matrix_8h_source.html">PartlyPrecomputedMatrix.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#ab2069225766e15ddd81809953c940467">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::PartlyPrecomputedMatrix()</a>, and <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#aed8139929435c448eac748cf119ef275">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::row()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/LinAlg/<a class="el" href="_partly_precomputed_matrix_8h_source.html">PartlyPrecomputedMatrix.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
